package com.zhuss.controller.core;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zhuss.bean.bo.core.banner.CreateBannerBo;
import com.zhuss.bean.bo.core.banner.DeleteBannerBo;
import com.zhuss.bean.bo.core.banner.UpdateBannerBo;
import com.zhuss.common.BaseController;
import com.zhuss.common.OperateService;
import com.zhuss.core.banner.BannerOperateServiceExt;
import com.zhuss.exception.WpsException;


/**
 * banner操作 controller
 * @Author zhushanshuo
   @Date 2020-02-04 22:58
 *
 */
  
 
@RestController
@RequestMapping("/banner")
public class BannerOperateController extends BaseController {
	
	@Autowired
	@Qualifier("bannerOperateService")
	private OperateService<Void, Object> bannerOperateService;
	
	@Autowired
	@Qualifier("bannerOperateServiceExt")
	private BannerOperateServiceExt bannerOperateServiceExt;
	
	/**
	 * 创建
	 * @param bo
	 * @throws WpsException
	 */
	@ResponseBody
    @PostMapping("/create")
    public void create(@RequestBody CreateBannerBo bo) throws WpsException {
		
		bannerOperateService.create(bo);
    }
	
	
	/**
	 * 修改
	 * @param bo
	 * @throws WpsException
	 */
	@ResponseBody
    @PostMapping("/update")
    public void update(@RequestBody UpdateBannerBo bo) throws WpsException {
		
		bannerOperateService.update(bo);
    }
	
	/**
	 * 删除
	 * @param bo
	 * @throws WpsException
	 */
	@ResponseBody
    @PostMapping("/delete")
    public void delete(@RequestBody DeleteBannerBo bo) throws WpsException {
		
		bannerOperateService.delete(bo);
    }


	
}
